package anonymouschat.messages.securitymessages;

import anonymouschat.messages.Message;
import anonymouschat.messages.TextMessage;
import anonymouschat.security.integrity.DigSig;

/**
 * This is the message that an end user receives. The client can check the
 * integrity by verifying the signature.
 * 
 * @author bh349
 * 
 */
public class TextMessageWithSig extends Message {

	private static final long serialVersionUID = -1147387240878367153L;

	private TextMessage textMessage;
	private DigSig signature;
	
	public TextMessageWithSig(TextMessage msg, DigSig signature) {
		super();
		textMessage = msg;
		this.signature = signature;
	}

	public TextMessage getTextMessage() {
		return textMessage;
	}

	public DigSig getSignature() {
		return signature;
	}

	@Override
	public String getAllContents() {
		return "Text message with digsig";
	}
}
